﻿using System;

namespace Earthwatchers.Models
{
    public class Earthwatcher
    {
        private string baseEarthwatcherUri = "earthwatchers/{0}";
        private string baseLandUri = "land/{0}";
        public int Id { get; set; }
        public Guid Guid { get; set; }
        public string Name { get; set; }
        public Role Role { get; set; }
        public int? LandId { set; get; }
        public string Basecamp { get; set; }

        public string Uri
        {
            get { return String.Format(baseEarthwatcherUri, Id); }
            set { baseEarthwatcherUri = value; }
        }

        public string LandUri
        {
            get 
            {
                return (LandId != null ? String.Format(baseLandUri, LandId) : String.Empty);
            }
            set { baseLandUri = value; }
        }        
    }
}
